package com.nms.service.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Component;

import com.nms.dao.EmailDao;
import com.nms.model.Email;
import com.nms.service.EmailService;

@Component("emailService")
public class EmailServiceImpl implements EmailService {
	private EmailDao emailDao;

	public EmailDao getEmailDao() {
		return emailDao;
	}

	@Resource(name = "emailDao")
	public void setEmailDao(EmailDao emailDao) {
		this.emailDao = emailDao;
	}

	@Override
	public boolean save(Email e) {
		return emailDao.save(e);
	}

	@Override
	public boolean delete(int eid) {
		return emailDao.delete(eid);
	}

	@Override
	public Email getEmail(int eid) {
		return emailDao.getEmail(eid);
	}

	@Override
	public List<Email> findUEmail(String username) {
		return emailDao.findUEmail(username);
	}
}
